perm filename TEST.TEX[WEB,ALS]2 blob
sn#636753 filedate 1982-01-17 generic text, type T, neo UTF8
\input webhdr
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 % Here is TEX material that gets inserted after \input webhdr
C00008 ENDMK
C⊗;
% Here is TEX material that gets inserted after \input webhdr
\def\hang{\hangindent 3em\ \unskip\!}
\def\TEX{\hbox{T\hskip-.1667em\lower.424ex\hbox{E}\hskip-.125em X}}
\font b=cmr9 \def\mc{\:b} % medium caps for names like PASCAL
\def\PASCAL{{\mc PASCAL}}
\def\pb{$\.|\ldotsm\.|$} % pascal brackets (|...|)
\def\v{\.{\char'174}} % vertical (|) in typewriter font
\def\RA{\mathrel{\char'441}} % right arrow
\def\at{@} % at sign for control texts
\def\({} % kludge for alphabetizing certain module names
\font D=cmtt at 15truept % font used in the title line below (only)
\font E=cmr7 at 14truept % font used in the title line below (only)
\def\title{WEAVE}
\vfill
\ctrline{\:E The {\:D WEAVE} processor}
\vskip 15pt
\ctrline{(preliminary version, November 1981)}
\vfill}
\ctrline{\ragged0\spaceskip0pt\xspaceskip0pt\baselineskip9pt
\hbox par 5in{\:bThis copy of the program is
being distributed to interested ``guinea pigs'' before it has
been thoroughly tested, in order to get extra help in the testing
process. It is expected that changes will be made frequently
while \TEX82 is being developed in the next months. Several
comments in this documentation imply that the program has
already been applied successfully to \TEX; such remarks are
merely wishful thinking at this point, but they will be true
when the final version is completed.}}}
\setcount0
\ctrline{(replace this page by the contents page printed later)}
\mark{1}\eject
\M1. Introduction.
This program converts a \.{WEB} file to a \TEX\ file. It was written
by D. E. Knuth in October, 1981; a somewhat similar {\mc SAIL} program had
been developed in March, 1979, although the earlier program used a top-down
parsing method that is quite different from the present scheme.
The code uses a few features of the local \PASCAL\ compiler that may need
to be changed in other installations:
\yskip\item{1)} Case statements have a default.
\item{2)} Input-output is done with ascii characters in a way that allows
end-of-page marks to be distinguished from end-of-line marks.
\yskip\noindent
These features are also present in the \PASCAL\ version of \TEX, where they
are used in a similar (but more complex) way. System-dependent portions
of \.{WEAVE} can be identified by looking at the entries for `system
dependencies' in the index below.
\M2. The program begins with a fairly normal header, made up of pieces that
will mostly be filled in later. The \.{WEB} input comes from file \\{input},
the \TEX\ output goes to file \\{output}, and error messages go to the
terminal (\\{tty}).
If it is necessary to abort the job because of a fatal error, the program
calls the `\\{quit}' procedure, which goes to the label \\{end\←of\←WEAVE}.
\Y\P\D \37$\\{end\←of\←WEAVE}=9999$\C{go here to wrap it up}\par
\Y\P\X0:Compiler directives\X\6
\4\&{program}\1\ \37$\\{WEAVE}(\\{input},\39\\{output},\39\\{tty})$;\6
\4\&{label} \37\\{end\←of\←WEAVE};\C{go here to finish}\6
\4\&{const} \37\X0:Constants in the outer block\X\6
\4\&{type} \37\X0:Types in the outer block\X\6
\4\&{var} \37\X0:Globals in the outer block\X\6
\X0:Error handling procedures\X\6
\4\&{procedure}\1\ \37\\{initialize};\6
\4\&{var} \37\X0:Local variables for initialization\X\2\6
\&{begin} \37\X0:Set initial values\X\6
\&{end};\par
\inx
\+\&{begin}, \[2].
\+\\{end\←of\←WEAVE}, \[2].
\+\\{initialize}, \[2].
\+\\{input}, \[2].
\+\\{output}, \[2].
\+\&{procedure}, \[2].
\+\\{quit}, 2.
\+{system dependencies}, 2.
\+\\{tty}, \[2].
\+\\{WEAVE}, \[2].
\fin
\+\X0:Compiler directives\X
\+\X0:Constants in the outer block\X
\+\X0:Error handling procedures\X
\+\X0:Globals in the outer block\X
\+\X0:Local variables for initialization\X
\+\X0:Set initial values\X
\+\X0:Types in the outer block\X
\con